package com.aode.playlist.repository;

import android.app.Application;

import androidx.lifecycle.MutableLiveData;

import com.aode.common.bean.request.SearchData;
import com.aode.common.bean.response.Mllist;
import com.aode.common.bean.response.Music;
import com.aode.common.bean.web.Result;
import com.aode.playlist.network.HttpData;

import java.util.List;

public class Repository {
    private static MutableLiveData<Result<List<Music>>> musicMutableLiveData = new MutableLiveData<>();
    private static MutableLiveData<Result<List<Mllist>>> mllistMutableLiveData = new MutableLiveData<>();

    private Application application;
    public Repository(Application application){
        this.application = application;
    }

    public void getMusic(SearchData searchData){
       musicMutableLiveData =  HttpData.getMusic(searchData);
    }

    public MutableLiveData<Result<List<Music>>> getMusicMutableLiveData(){
        return musicMutableLiveData;
    }


    public void getMllist(){
        mllistMutableLiveData = HttpData.getMllist();
    }

    public MutableLiveData<Result<List<Mllist>>> getMllistMutableLiveData(){
        return mllistMutableLiveData;
    }
}
